<?
	require_once('./application/classes/item/xml.class.php');
	class xmlModel extends db implements db_interface{

		private static $instance;
		
		public function __construct($iDb){
	
			parent::__construct($iDb);
	
		}
		public static function getInstance($iDb){
	
			if(self::$instance == NULL){
				self::$instance = new self($iDb);
			}
		
		return self::$instance;
		}
		
		public function fill()
		{
			$xmls = array();
			$query = $this -> db -> query('select bew_id,bew_titel,bew_foto_path,bew_beschrijving from bewonersgroep join gebruikers on (bew_id = geb_id) where geb_verwijderd = 0;');
		
		
		
		
		while ($row = $query->fetch_assoc())
		{
			$xml = new item_xml($this -> db);
			$xml -> geb_id = $row['bew_id'];
			$xml -> title = $row['bew_titel'];
			$xml -> foto_path = $row['bew_foto_path'];
			$xml -> geb_naam = $row['bew_titel'];
			$xml -> beschrijving = $row['bew_beschrijving'];
			
			$xmls [] = $xml;
		}
			return $xmls;
		}
		
		
		
		
		
		
	}


?>